This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 19, 2012, 10:36 AM
10 Posts
topic has been resolvedResolved

Paging when using xe:jdbcQuery (copy of post on openntf.org)

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: jdbcquery
  • Replies: 2
Hello all,

I am evaluating XPages for an application which must access both Notes data as well as data from several DB2 tables and show them in view controls. Using the RDBMS features in the extension library, I can get my DB2 data without problems.

I am, however, worried about performance, because I need to access tables with 500000+ rows. In the presentation "XPages Goes Relational", Philippe Riand states that the jdbcQuery data source uses the JDBC result set and optionally maintains a cache. But returning half a million rows seems a little drastic, considering that the user will page through the data 25 or 50 rows at a time. Is there anyone out there already using the functionality, who can shed some light on the performance?

I would like to use a select statement that specifies the starting row and limits the number of results returned to Domino and passing them to the query as parameters, e.g.:  SELECT * FROM ORDTAB WHERE ROWNUM > ? FETCH FIRST ? ROWS ONLY

This would require the pager to expose the selected page to be used as a SQL parameter (I can get the result set size by providing a listbox for user selection) and re-issue the query prior to refreshing the view control. But it doesn't look like the pager exposes anything I can use.

Does anybody know of a pager that will let me do this, or do I need to roll my own?

Any thoughts or help will be highly appreciated. Thanks,
Alex Rasmussen
Jan 19, 2012, 12:46 PM
272 Posts
Re: Paging when using xe:jdbcQuery (copy of post on openntf.org)
Hi,
 
to get the current page from a pager you can use this code:
 
var pager:com.ibm.xsp.component.UIPager = getComponent("pager1");
var pagerState:com.ibm.xsp.component.UIPager$PagerState = pager.createPagerState();
pagerState.getCurrentPage()

 
It returns 0 for the 1st Page, 1 for the 2nd etc.
 
Hope this helps
Sven
 
Jan 19, 2012, 9:22 PM
10 Posts
Re: Paging when using xe:jdbcQuery (copy of post on openntf.org)
Hi Sven,
 
Thanks, that works like a charm.
 
Cheers

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal